package com.lcry.springcloudalibaba.service;


import com.lcry.springcloud.entities.CommonResult;
import com.lcry.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author lcry
 * @date 2020/03/17 15:59
 */
//openfeign调用nacos-payment-provider服务
@FeignClient(value = "nacos-payment-provider",
//        降级处理的方法
        fallback = PaymentFallbackService.class)
public interface PaymentService {
    @GetMapping(value = "/paymentSQL/{id}")
    public CommonResult<Payment> paymentSQL(@PathVariable("id") Long id);
}
